//
//package com.example.front.controller;
//
//import com.example.common.dto.JsonResult;
//import com.example.common.dto.ListDto;
//import com.example.common.dto.Pagination;
//import com.example.front.dto.*;
//import com.example.front.entity.Line;
//import com.example.front.serivce.LineUserService;
//import com.example.interceptor.UserContext;
//import com.example.passport.entity.User;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.BeanUtils;
//import org.springframework.web.bind.annotation.*;
//
//import javax.annotation.Resource;
//import javax.validation.Valid;
//
//@Api(tags = "工组管理")
//@RestController
//@CrossOrigin
//@RequestMapping("/front/lineUser")
//public class LineUserController {
//
//    @Resource
//    LineUserService lineUserService;
//
//    @ApiOperation("添加产线工组")
//    @PostMapping("/create")
//    public JsonResult<String> create(@Valid @RequestBody LineUserCreateDto lineUserCreateDto) {
//        User user = UserContext.getUser();
//        lineUserCreateDto.setTenantId(user.getTenantId());
//        lineUserService.create(lineUserCreateDto);
//        return new JsonResult<>();
//    }
//
//    @ApiOperation("删除产线工组")
//    @PostMapping("/delete")
//    public JsonResult<String> delete(Long id){
//        User user = UserContext.getUser();
//        lineUserService.delete(user.getTenantId(),id);
//        return new JsonResult<>();
//    }
//
//    @ApiOperation("修改工组")
//    @PostMapping("/update")
//    public JsonResult<String> update(@Valid LineUserDto LineUserDto){
//        User user = UserContext.getUser();
//        LineUserDto.setTenantId(user.getTenantId());
//        lineUserService.updateLine(LineUserDto);
//        return new JsonResult<>(true, "修改成功");
//    }
//
//    @ApiOperation("工组列表")
//    @GetMapping("/list")
//    public JsonResult<ListDto<LineUserDto>> list(LineUserSearchDto condition, Pagination pagination){
//        User user = UserContext.getUser();
//        condition.setTenantId(user.getTenantId());
//        return new JsonResult<>(lineUserService.list(condition, pagination));
//
//    }
//
//}
//
